package com.wc.alorithm_luogu.P4956;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/4/20 13:18
 * @description https://www.luogu.com.cn/problem/P4956
 * Davor
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int sum = sc.nextInt();

        sum /= 7;
        sum /= 52;

        int k = 1;

        int x = sum - 3 * k;

        while (x > 100) {
            k++;
            x = sum - 3 * k;
        }
        System.out.println(x + "\n" + k);
    }
}
